<template>
  <view>
    <view class="text-padding-wrap uni-flex uni-row">
      <view
        ><view class="name">{{ info.name }}</view
        ><view class="put" @tap="toPut(info)">查看/编辑个人资料</view>
      </view>
      <view><img :src="info.picture" alt="" class="picture" /></view>
    </view>
    <view class="far-padding-wrap uni-flex uni-row"
      ><view
        ><view class="title">钱包</view><view class="value">0.00</view></view
      >
      <view
        ><view class="title">红包</view><view class="value">0.00</view></view
      >
      <view
        ><view class="title">积分</view><view class="value">100</view></view
      ></view
    >
    <view class="text-padding-wrap card uni-flex uni-row">
      <view
        ><view class="father left-flex uni-row"
          ><view class="iconfont icon-jiating"></view
          ><view class="home">我的家庭</view
          ><view class="number">{{ family.number }}位成员</view></view
        >
        <view class="address">{{ family.address }}</view></view
      >
      <view><img src="../../static/family.jpg" alt="" /></view>
    </view>
    <view class="main">
      <view class="one-padding-wrap uni-flex uni-row" @tap="toDoor()"
        ><view class="one">智能门禁</view
        ><view class="iconfont icon-jiantou"></view
      ></view>
      <view class="one-padding-wrap uni-flex uni-row" @tap="toOrder()"
        ><view class="one">我的订单</view
        ><view class="iconfont icon-jiantou"></view
      ></view>
      <view class="one-padding-wrap uni-flex uni-row" @tap="toBill()"
        ><view class="one">我的账单</view
        ><view class="iconfont icon-jiantou"></view
      ></view>
      <view class="one-padding-wrap uni-flex uni-row" @tap="toInteract()"
        ><view class="one">我的互动</view
        ><view class="iconfont icon-jiantou"></view
      ></view>
      <view class="one-padding-wrap uni-flex uni-row" @tap="toFriend()"
        ><view class="one">我的访客</view
        ><view class="iconfont icon-jiantou"></view
      ></view>
      <!-- <view class="one-padding-wrap uni-flex uni-row"
        ><view class="one">设置</view><view class="iconfont icon-jiantou"></view
      ></view> -->
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      info: {
        picture: "https://z3.ax1x.com/2021/06/06/2UTk7V.png",
        name: "satsun",
        birth: "2001-01-01",
        gender: "男",
        phone: "13511115945",
        say: "前端菜鸡陷入样式地狱",
      },
      family: {
        number: 1,
        address: "广东珠海京师家园-住宅-3栋-301",
      },
    };
  },
  methods: {
    toPut(leadobj) {
      uni.navigateTo({
        url: "./put?leadobj=" + encodeURIComponent(JSON.stringify(leadobj)),
      });
    },
    toDoor() {
      uni.navigateTo({
        url: "./door",
      });
    },
    toOrder() {
      uni.navigateTo({
        url: "./order",
      });
    },
    toBill() {
      uni.navigateTo({
        url: "./bill",
      });
    },
    toInteract() {
      uni.navigateTo({
        url: "./interact",
      });
    },
    toFriend() {
      uni.navigateTo({
        url: "./friend",
      });
    },
  },
};
</script>

<style>
page {
  background-color: #ffffff;
}
.text-padding-wrap {
  padding: 30rpx;
}
.far-padding-wrap {
  padding: 30rpx 60rpx;
}
.uni-flex {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  /* margin-bottom: 10px; */
}
.left-flex {
  display: flex;
  flex-direction: row;
  justify-content: left;
}
.uni-row {
  flex-direction: row;
}
.name {
  font-size: 22px;
  color: #4cb39a;
}
.put {
  color: #868b96;
  margin-top: 3px;
}
.picture {
  border-radius: 50%;
}
img {
  width: 60px;
  height: 60px;
}
.title {
  color: #4cb39a;
  font-size: 13px;
}
.value {
  font-weight: bolder;
  font-size: 13px;
}
.card {
  background-color: #fafafa;
  box-shadow: 0px 0px 15px #eaeaee;
}
.address {
  margin-top: 15px;
}
.home {
  color: #4cb39a;
  font-size: 14px;
}
.number {
  position: absolute;
  bottom: 0;
  left: 78px;
}
.father {
  position: relative;
}
.one-padding-wrap {
  padding: 50rpx;
  border-bottom: 1px solid #ebebeb;
}
.one {
  font-size: 14px;
}
.main {
  margin-top: 15px;
}
</style>